package com.mxj.userlogin.controller;


import com.mxj.userlogin.dto.PhoneCodeDto;
import com.mxj.userlogin.ov.R;
import com.mxj.userlogin.service.intf.SmslogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/sms/")
@Api(tags = "实现短信相关操作接口")
public class SmslogController {
    @Resource
    private SmslogService service;

    @ApiOperation(value = "发送注册验证码")
    @PostMapping("sendrcode.do")
    public R send(String phone){
        return service.sendRCode(phone);
    }

    @ApiOperation(value = "校验注册验证码")
    @PostMapping("checkrcode.do")
    public R check(@RequestBody PhoneCodeDto dto){
        return service.checkRCode(dto);
    }

}
